package com.xhwl.data.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xhwl.common.dto.cent.sdata.AppVersionDTO;
import com.xhwl.common.pojo.ResultJson;
import com.xhwl.common.pojo.cent.sdata.AppVersion;
import com.xhwl.common.query.cent.sdata.AppVersionQuery;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author JCccc
 * @Description
 * @Date 2021/7/17 10:33
 */
@RestController
public interface IAppVersionService {


    /**
     * 创建
     *
     * @param appVersion
     * @return
     */
    @RequestMapping(value = "/app-version-service/create", method = RequestMethod.POST)
    ResultJson create(@RequestPart AppVersion appVersion);

    /**
     * 更新
     *
     * @param appVersion
     * @return
     */
    @RequestMapping(value = "/app-version-service/update", method = RequestMethod.POST)
    ResultJson update(@RequestPart AppVersion appVersion);


    /**
     * 删除
     *
     * @param id
     * @return
     */
    @RequestMapping(value = "/app-version-service/delete", method = RequestMethod.POST)
    ResultJson delete(@RequestPart Integer id);

    /**
     * 列表查询
     *
     * @param appVersionQuery
     * @return
     */
    @RequestMapping(value = "/app-version-service/list", method = RequestMethod.POST)
    List<AppVersionDTO> list(@RequestPart(required = false) AppVersionQuery appVersionQuery);


    /**
     * 分页查询
     *
     * @param appVersionQuery
     * @param page
     * @return
     */
    @RequestMapping(value = "/app-version-service/page-list", method = RequestMethod.POST)
    Page<AppVersionDTO> pageList(@RequestPart(required = false) AppVersionQuery appVersionQuery, @RequestPart Page page);


    /**
     * 获取最新版本信息
     *
     * @param appVersionQuery
     * @return
     */
    @RequestMapping(value = "/app-version-service/get-newest-version", method = RequestMethod.POST)
    AppVersion getNewestVersion(@RequestPart("appVersionQuery") AppVersionQuery appVersionQuery);


}
